<!DOCTYPE html>
<html>
<head>
	<title>Context menu adding first item</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myContextMenu1, myContextMenu2, myContextMenu3;
		function doOnLoad() {
			myContextMenu1 = new dhtmlXMenuObject({
				parent: "contextZone_A",
				icons_path: "../common/imgs/",
				context: true
			});
			myContextMenu1.addNewChild(myContextMenu1.topId, 0, "open", "Open", false, "open.gif");
			myContextMenu1.addNewChild(myContextMenu1.topId, 1, "save", "Save", false, "save.gif");
			myContextMenu1.addNewChild(myContextMenu1.topId, 3, "close", "Close", false, "close.gif");
			
			// checkboxes
			myContextMenu2 = new dhtmlXMenuObject({
				parent: "contextZone_B",
				icons_path: "../common/imgs/",
				context: true
			});
			myContextMenu2.addCheckbox("child", myContextMenu2.topId, 0, "ignore_case", "Ignore Case", true);
			myContextMenu2.addCheckbox("child", myContextMenu2.topId, 1, "search_everywhere", "Search Everywhere");
			
			// radios
			myContextMenu3 = new dhtmlXMenuObject({
				parent: "contextZone_C",
				icons_path: "../common/imgs/",
				context: true
			});
			myContextMenu3.addRadioButton("child", myContextMenu3.topId, 0, "red", "Red", "color", true);
			myContextMenu3.addRadioButton("child", myContextMenu3.topId, 1, "green", "Green", "color");
			myContextMenu3.addRadioButton("child", myContextMenu3.topId, 2, "blue", "Blue", "color");
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div style="height: 400px; position: relative;">
		<div id="contextZone_A" style="position: absolute; left: 100px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Items</div>
		<div id="contextZone_B" style="position: absolute; left: 220px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Checkboxes</div>
		<div id="contextZone_C" style="position: absolute; left: 340px; top: 100px; width: 100px; height: 60px; border: #C1C1C1 1px solid; background-color: #E7F4FF;">Radios</div>
	</div>
</body>
</html>